﻿// =================================================================== 
// 项目说明,功能实体类,用CodeSmith自动生成。
// =================================================================== 
// 文件名: CouponEntity.cs
// 修改时间：2020-9-8 10:40:01
// 修改人: lixiong
// =================================================================== 
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using JX.Infrastructure.Attribute;
using JX.Infrastructure.Common;

namespace JX.Core.Entity
{
	/// <summary>
	/// 数据库表：Coupon 的实体类.
	/// </summary>
	[Table("Coupon")]
	public partial class CouponEntity
	{
		#region Properties
		private int? _couponID = 0;
		/// <summary>
		/// 优惠券ID(主键)
		/// </summary>
		[Column("CouponID",TypeName="int")]
		[Key]
		public int? CouponID
		{
			get {return _couponID;}
			set {_couponID = value;}
		}
		
		private System.String _couponName = string.Empty;
		/// <summary>
		/// 优惠券名称
		/// </summary>
		[Column("CouponName",TypeName="nvarchar(50)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String CouponName
		{
			get {return _couponName;}
			set {_couponName = value;}
		}
		
		private System.String _couponNumPattern = string.Empty;
		/// <summary>
		/// 优惠券号码生成格式
		/// </summary>
		[Column("CouponNumPattern",TypeName="nvarchar(50)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String CouponNumPattern
		{
			get {return _couponNumPattern;}
			set {_couponNumPattern = value;}
		}
		
		private decimal? _money = 0;
		/// <summary>
		/// 面值
		/// </summary>
		[Column("Money",TypeName="money")]
		public decimal? Money
		{
			get {return _money;}
			set {_money = value;}
		}
		
		private int? _state = 0;
		/// <summary>
		/// 状态
		/// </summary>
		[Column("State",TypeName="int")]
		public int? State
		{
			get {return _state;}
			set {_state = value;}
		}
		
		private System.String _userGroup = string.Empty;
		/// <summary>
		/// 适用会员组
		/// </summary>
		[Column("UserGroup",TypeName="nvarchar(50)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String UserGroup
		{
			get {return _userGroup;}
			set {_userGroup = value;}
		}
		
		private DateTime? _beginDate = null;
		/// <summary>
		/// 开始时间
		/// </summary>
		[Column("BeginDate",TypeName="datetime")]
		public DateTime? BeginDate
		{
			get {return _beginDate;}
			set {_beginDate = value;}
		}
		
		private DateTime? _endDate = null;
		/// <summary>
		/// 截止时间
		/// </summary>
		[Column("EndDate",TypeName="datetime")]
		public DateTime? EndDate
		{
			get {return _endDate;}
			set {_endDate = value;}
		}
		
		private int? _limitNum = 0;
		/// <summary>
		/// 限用次数
		/// </summary>
		[Column("LimitNum",TypeName="int")]
		public int? LimitNum
		{
			get {return _limitNum;}
			set {_limitNum = value;}
		}
		
		private int? _productLimitType = 0;
		/// <summary>
		/// 限用商品类型
		/// </summary>
		[Column("ProductLimitType",TypeName="int")]
		public int? ProductLimitType
		{
			get {return _productLimitType;}
			set {_productLimitType = value;}
		}
		
		private System.String _productLimitContent = string.Empty;
		/// <summary>
		/// 限用商品
		/// </summary>
		[Column("ProductLimitContent",TypeName="nvarchar(255)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String ProductLimitContent
		{
			get {return _productLimitContent;}
			set {_productLimitContent = value;}
		}
		
		private int? _couponCreateType = 0;
		/// <summary>
		/// 优惠券生成方式
		/// </summary>
		[Column("CouponCreateType",TypeName="int")]
		public int? CouponCreateType
		{
			get {return _couponCreateType;}
			set {_couponCreateType = value;}
		}
		
		private System.String _couponCreateContent = string.Empty;
		/// <summary>
		/// 优惠券生成条件内容
		/// </summary>
		[Column("CouponCreateContent",TypeName="nvarchar(255)")]
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public System.String CouponCreateContent
		{
			get {return _couponCreateContent;}
			set {_couponCreateContent = value;}
		}
		
		private decimal? _orderTotalMoney = 0;
		/// <summary>
		/// 使用该优惠券需要的订单满足金额
		/// </summary>
		[Column("OrderTotalMoney",TypeName="money")]
		public decimal? OrderTotalMoney
		{
			get {return _orderTotalMoney;}
			set {_orderTotalMoney = value;}
		}
		
		private DateTime? _useBeginDate = null;
		/// <summary>
		/// 使用开始时间
		/// </summary>
		[Column("UseBeginDate",TypeName="datetime")]
		public DateTime? UseBeginDate
		{
			get {return _useBeginDate;}
			set {_useBeginDate = value;}
		}
		
		private DateTime? _useEndDate = null;
		/// <summary>
		/// 使用截止时间
		/// </summary>
		[Column("UseEndDate",TypeName="datetime")]
		public DateTime? UseEndDate
		{
			get {return _useEndDate;}
			set {_useEndDate = value;}
		}
		
		private int? _couponItemNum = 0;
		/// <summary>
		/// 优惠卷张数
		/// </summary>
		[Column("CouponItemNum",TypeName="int")]
		public int? CouponItemNum
		{
			get {return _couponItemNum;}
			set {_couponItemNum = value;}
		}
		
		#endregion
	}
}
